<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>父传子(props驼峰标识)</title>
</head>
<body>
    <div id="app">
        <cpn :c-info="info" :child-my-message="message"></cpn>
    </div>

</body>
    <template id="cpn">
        <div>
            <h1>{{childMyMessage}}</h1>
            <p>{{cInfo}}</p>
        </div>
    </template>
    <script src="../js/vue.js"></script>
    <script>

        const cpn = {
            template: '#cpn',
            props: {
                cInfo: {
                    type: Object,
                    default() {
                        return {}
                    }
                },
                childMyMessage: {
                    type: String,
                    default() {
                        return 'default';
                    }
                }
            },
            data () {
                return {}
            },
            methods: {

            },
        }

        const app = new Vue({
            el: '#app',
            data: {
                info: {
                    name: '约翰康纳',
                    age: '20',
                    height: 1.88
                },
                message: '根组件'
            },
            methods: {

            },
            components: {
                cpn
            }
        })
    </script>
</html>